package com.zzyl.controller.customer;

import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.dto.UserLoginRequestDto;
import com.zzyl.service.MemberService;
import com.zzyl.vo.LoginVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description CustomerController
 * @Author Wen Jie
 * @Date 2024-09-12
 */
@RestController
@Api(tags = "客户管理")
@RequestMapping("/customer/user")
@Slf4j
public class CustomerController extends BaseController {
    @Autowired
    private MemberService  memberService;
    @PostMapping("/login")
    @ApiOperation(value = "客户登录")
    public ResponseResult<LoginVo> login(@RequestBody UserLoginRequestDto userLoginRequestDto){
        log.info("客户登录");
        LoginVo loginVo = memberService.login(userLoginRequestDto);
        return success(loginVo);
    }
}
